<?php
$this->breadcrumbs=array(
	Yii::t('main','Users')=>array('user/'),
	$model->username,
);

$this->menu=array(
	//array('label'=>Yii::t('main','List'), 'url'=>array('index')),
	array('label'=>Yii::t('main','Create'), 'url'=>array('create')),
	array('label'=>Yii::t('main','Update'), 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>Yii::t('main','Delete'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete', 'id'=>$model->id), 'confirm'=>Yii::t('main','Are you sure to delete this item?'))),
	array('label'=>Yii::t('main','Manage'), 'url'=>array('user/')),
	array('label'=>Yii::t('main','New Pay'), 'url'=>array('payment/create', 'user_id'=>$model->id), 'linkOptions'=>array('id'=>'showPaymentDialog')),
	array('label'=>Yii::t('main','Print Invoice'), 'url'=>array('invoice', 'user_id'=>$model->id))
);
?>

<h1><?php echo Yii::t('main','View').' '.$model->username; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'contract',
		'username',
		'password',
		'balanceEnd',
		'address',
		'email',
		'telephon',
		'end_time',
		'is_active',
		'create_time',
		'update_time',
),
)); ?>

<br />

<?php $this->widget('CTabView', array(
	'tabs'=>array(
		'service'=>array('title'=>Yii::t('main','Services'), 'view'=>'tab', 'data'=>array('id'=>'service-portlet', 'url'=>$this->createUrl('service',array('id'=>$model->id)))),
		'payacc'=>array('title'=>Yii::t('main','Payaccs'), 'view'=>'tab', 'data'=>array('id'=>'payacc-portlet', 'url'=>$this->createUrl('payacc',array('id'=>$model->id)))),
		'payment'=>array('title'=>Yii::t('main','Payments'), 'view'=>'tab', 'data'=>array('id'=>'paymnet-portlet', 'url'=>$this->createUrl('payment',array('id'=>$model->id,'ajax'=>'payment-grid')))),
		'history'=>array('title'=>Yii::t('main','Histories'), 'view'=>'tab', 'data'=>array('id'=>'history-portlet', 'url'=>$this->createUrl('history',array('id'=>$model->id,'ajax'=>'history-grid')))),
	),
));
Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl.'/css/gridview/styles.css');  // bug in chrome (Не загружает цсс в вяксовских запросах)
?>

